import {connect} from 'react-redux';
import * as actions from './actions';
import * as actionTypes from './consts';
import Component from './components/Component';

const {dataSources, ajaxStatus} = actionTypes.key;
const mapStateToProps = state => ({
  dataSources: state.datasource.get(dataSources),
  ajaxStatus: state.datasource.get(ajaxStatus),
});

const mapDispatchToProps = {
  getDataSources: actions.getDataSources
};

export default connect(mapStateToProps, mapDispatchToProps)(Component);
